#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1e6 + 10;
int a[N];
int n;

int gcd(int a, int b)
{
    return b ? gcd(b, a - b) : a;
}

int main(int argc, char const *argv[])
{
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    sort(a, a + n);
    int d = 0;
    for (int i = 0; i < n; i++)
        d = gcd(d, a[i] - a[0]);
    if (!d)
        cout << n;
    else
        cout << (a[n - 1] - a[0]) / d + 1 << endl;
    return 0;
}
